Implantable medical devices exist that monitor, and/or electrically stimulate body tissue for treatment or relieving the symptoms of a wide variety of physiological or psychological maladies. Such implantable devices are typically part of systems that are entirely implantable within the patient or are partially implantable and partially external to the patient.
Such implantable devices are often powered by an internal power source, such as a battery, that powers the device functions continuously over a long period of time. Often for implantable medical devices, the power source used to power the device's circuitry is non-rechargeable. As such, the longevity of the device is a function of the rate of depletion of the battery, which may range from approximately three years to approximately ten years based upon the usage of the stored charge.
The implantable devices will typically also comprise electronic circuitry that includes one or more memory components. One example of such a memory component is a flash memory. Flash memories have emerged in the art in recent years as an important nonvolatile memory which combines the advantages of EPROM density with EEPROM electrical eraseability. Flash memories are so named because a plurality of memory cells in a block or sector are erased at the same time. Thereafter, selected bits, bytes, or words are programmed into the memory. Flash memories have been used to store executable code and/or other types of information. Flash memory can be rewritten and can hold its contents without power, and thus is nonvolatile. Flash memory is generally constructed of flash memory cells where, generally, single bits of data are stored in and read from respective memory cells. The cells are generally programmed by hot electron injection and erased by Fowler-Nordheim tunneling or other mechanisms.
The erase, program, and read operations are commonly performed by application of appropriate voltages to certain terminals of the memory cell. In an erase or write operation, the voltages are applied so as to cause a charge to be removed or stored in the memory cell. In a read operation, appropriate voltages are applied so as to cause a current to flow in the cell, wherein the amount of such current is indicative of the value of the data stored in the cell. The memory device includes appropriate circuitry to sense the resulting cell current in order to determine the data stored therein, which is then provided to data bus terminals of the device for access by other devices in a system in which the memory device is employed.
Programming circuitry controls a bit of a cell by applying a signal to a wordline, which acts as a control gate, and changing bitline connections such that the bit is stored by the source and drain connections. Programming a cell using a suitable mechanism, such as hot electron injection, generally increases the threshold voltage of a cell. Erasing is performed as a blanket operation wherein an array or sector of cells can be simultaneously erased and typically produces a lower threshold voltage in the cell.
In the blanket erasing of flash memory, cells within an array or sector are typically erased concurrently. After each erase pulse, an erase verification or read can be performed to determine if each cell in the array is now “erased” (blank), or yet remains “un-erased” or “under-erased”, (e.g., whether the cell has a threshold voltage above a predetermined limit). If an under-erased cell is detected, an additional erase pulse can be applied to the entire array until all cells are sufficiently erased. U.S. Pat. No. 7,130,240 discloses a method for erasing sectors of a flash memory in sequence. However, erasing the contents of memory is a time-consuming and current-draining process.
In the context of an implantable medical device, the erase operations may consume a substantial portion of the battery power that is available over the operating life of the device. Moreover, because the erasure requires that an entire sector be erased, the existing erasure methods do not cater for selective erasure of unwanted data that is stored in a given sector if the given sector also contains wanted data. Therefore, a need remains for memory management techniques that optimize the consumption of the charge stored by the power source to extend the device longevity.